package com.bl.util;

import java.util.Random;

/**
 * @author ${user}
 */
public class StringGenerator {


    public static final int ALPHABET_START = 65;
    public static final int ALPHABET_LENGTH = 26;


    public String generateRandomString(final int length){
        final StringBuilder sb = new StringBuilder(length);
        for(int i = 0; i <length;i++){
            sb.append(generateRandomChar());
        }
        return sb.toString();
    }

    private char generateRandomChar(){
        final Random random = new Random();
        return (char)(ALPHABET_START + random.nextInt(ALPHABET_LENGTH));
    }
}
